package binTree;
//226. 翻转二叉树
public class Num226_invertTree {
    public TreeNode invertTree(TreeNode root) {
        //边界
        if (root == null){
            return null;
        }
        //左子树翻转
        TreeNode left = invertTree(root.left);
        //右子树翻转
        TreeNode right = invertTree(root.right);
        root.left = right;
        root.right = left;
        return root;

    }


}
